<layout name="../../../resource/master" />

<ul class="breadcrumb no-border no-radius b-b b-light pull-in">
    <li><a href="{:u('admin/index/index')}"><i class="fa fa-home"></i>首页</a></li>
    <li><a href="{:u('admin/type/index')}">类型管理</a></li>
    <li><a href="{:u('admin/type/index')}">类型列表</a></li>
    <!--<li class="active">Elements</li>-->
</ul>
<div class="m-b-md">
    <h3 class="m-b-none">类型管理</h3>

</div>
<div class="btn-group">
    <a href="{:u('set',['mo'=>$_GET['mo']])}" class="btn btn-success">添加顶级类型</a>
</div>
<div class="row">

    <div class="col-sm-12">
        <section class="panel panel-default">
            <header class="panel-heading font-bold">类型管理</header>
            <div class="panel-body">
                <table class="table table-hover">
                    <thead>
                    <tr>
                        <th>类型ID</th>
                        <th>类型</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    <volist name="field" id="vo">

                        <tr>
                            <td>{$vo['tid']}</td>
                            <td>{$vo['tname']}</td>
                            <td>
                                <div class="btn-group ">
                                    <a href="{:U('typeAttri/index',['tid'=>$vo['tid']])}" class="btn btn-info btn-xs ">类型属性</a>
                                    <a href="{:u('edit',['tid'=>$vo['tid'],'mo'=>$_GET['mo']])}" class="btn btn-success btn-xs">编辑</a>
                                    <a href="javascript:;" onclick="del({$vo['tid']})" class="btn btn-danger btn-xs">删除</a>

                                </div>
                            </td>
                        </tr>
                    </volist>

                    </tbody>
                </table>
            </div>
        </section>
    </div>
</div>
<script>
    function del(tid) {
//    alert(1);

        util.confirm('确定删除吗?',function(){
            location.href = "{:u('admin/Type/del')}"+'?tid='+tid ;
        })
    }
</script>